Srcs := $(wildcard *.c)
Outs := $(patsubst %.c, %.o, $(Srcs))
BIN := server
CC := gcc
CFLAGS = -Wall -g -lmysqlclient -lpthread -lcrypt

ALL: $(BIN)

$(BIN): $(Srcs)
	$(CC) -o $@ $^ $(CFLAGS)
	@rm -f $(Outs)

.PHONY: clean rebuild ALL

clean:
	$(RM) $(BIN)

rebuild: clean ALL
